package com.ark.frigate.dingtalk.utils;

import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

/**
 * @Author ZengWeiLong
 * @Description Copy Right Beyonca
 * @Date 2022/7/11 10:44
 * @Version 1.0
 */
public class HttpEntityUtil {

    public static <T> HttpEntity<T> getRequest(T t) {
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON);
        HttpEntity<T> request = new HttpEntity<>(t, headers);
        return request;
    }
}
